package com.jy.rhin.model.body.jiankangtj;


import com.jy.rhin.infra.cda.EDataElement;
import com.jy.rhin.infra.cda.XPath;
import com.jy.rhin.infra.cda.XValid;
import com.jy.rhin.model.CodeObject;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 诊断记录章节
 *
 * @author shenguangyang
 */
@Data
public class ZhenDuanJL {
    /**
     * 现存主要健康问题代码
     */
    @XPath(path = "/entry/observation/code[@code='DE05.10.080.00'][@codeSystem='2.16.156.10011.2.2.1']/value",
            xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE05_10_080_00, nullable = true))
    CodeObject xianCunZYJKWT;

    /**
     * 中医体质辨识
     */
    @XPath(path = "/entry/..", listItemPath = "/entry/organizer", listItemBackLevel = 0)
    List<ZhongYiTZ> zhongYiTZList = new ArrayList<>();

    @Data
    public static class ZhongYiTZ {
        @XPath(path = "/component/observation/code[@code='DE05.01.065.00'][@codeSystem='2.16.156.10011.2.2.1']/../value"
                , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE05_10_065_00))
        CodeObject tiZhiFL = new CodeObject();

        @XPath(path = "/component/observation/code[@code='DE05.01.073.00'][@codeSystem='2.16.156.10011.2.2.1']/../value"
                , xValid = @XValid(type = "dataElement", dataElement = EDataElement.DE05_10_073_00))
        CodeObject tiZhiFLPDJG = new CodeObject();
    }
}
